package com.lanxin.kh.service;

import com.lanxin.kh.entity.KhProduct;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 * 产品服务接口
 * </p>
 *
 * @author zyq
 * @since 2025-07-26
 */
public interface IKhProductService extends IService<KhProduct> {

    /**
     * 添加产品（含图片上传）
     */
    boolean addProduct(KhProduct khProduct, MultipartFile imgfile, HttpServletRequest request) throws Exception;

    /**
     * 更新产品（含图片更新）
     */
    boolean updateProduct(KhProduct khProduct, MultipartFile imgfile, HttpServletRequest request) throws Exception;

    /**
     * 校验产品名称是否存在
     */
    boolean checkNameExists(String name, Integer oid);
}